/**
 * 
 */
package com.geekteam.masterenglish.biz;

import java.util.ArrayList;

import android.content.ContentProviderOperation;

import com.geekteam.masterenglish.entity.AlbumInfo;
import com.geekteam.masterenglish.provider.EEContract;
import com.geekteam.masterenglish.provider.EEContract.Album;

/**
 * @author MTROL
 *
 */
public class AlbumBiz {
	public static void parseAlbumContent(AlbumInfo album, ArrayList<ContentProviderOperation> batch){
		ContentProviderOperation.Builder builder = ContentProviderOperation
				.newInsert(EEContract.addCallerIsSyncAdapterParameter(EEContract.Album.CONTENT_URI));
		
		builder.withValue(Album.ID, album.mId);
		builder.withValue(Album.TITLE, album.mTitle);
		builder.withValue(Album.COVER, album.mCover);
		builder.withValue(Album.TOTAL_LISTEN, album.mTotalListen);
		builder.withValue(Album.BOOK_ID, album.mBookId);
		
		batch.add(builder.build());
	}
}
